using GameFramework;
using GameFramework.Event;
using Newtonsoft.Json.Linq;

namespace StarForce
{
    public class WebResponseEventArgs : GameEventArgs
    {


        private int m_EventId;

        public override int Id
        {
            get
            {
                return m_EventId;
            }
        }

        private JObject m_JsonString;

        public JObject JsonString
        {
            get { return m_JsonString; }
            set { m_JsonString = value; }
        }

        public WebResponseEventArgs Fill(string webUrl,JObject json)
        {
            m_JsonString = json;
            m_EventId = WebUtility.GetIntHash(webUrl);
            return this;
        }

        public override void Clear()
        {
            m_EventId = 0;
            m_JsonString = null;
        }
    }
}